package com.example.doctor.jpa;

import com.example.common.entity.HDoctorNotice;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface HDoctorNoticeRepository extends JpaRepository<HDoctorNotice, Long> {
    @Query(value = "select * from h_doctor_notice where n_type_tinyint in (0,1) and is_top_bit = 1 order by is_top_bit desc,create_time_datetime desc limit 1",nativeQuery = true)
    HDoctorNotice findByLastTop();
}
